package gui.panel_new.evaluation.professor;

import enums.TestPanelEnum;
import gui.panel_new.OpenSavePanel;
import gui.panel_new.evaluation.exeptions.ExerciseNotBuiltException;
import gui.panel_new.evaluation.exeptions.PunctuationZeroException;
import model.eval.TestExcercise;
/*

    This file is part of Logica-Logike.

    Logica-Logike is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation version 3 of the License.

    Logica-Logike is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with Logica-Logike.  If not, see <http://www.gnu.org/licenses/>.

 */
/**
 * Extension de OpenSavePanel, es una clase abstracta que agrupa metodos basicos para los paneles destinados
 * a la creacion de ejercicios;
 *
 * @author Jose Martin Rozanec;
 */
public abstract class CreateExercisePanel extends OpenSavePanel {
    /**
     * Refiere al panel que debe mostrar la informacion propia del ejercicio;
     */
    protected TestPanelEnum testPanelEnum;

    /**
     * Permite obtener el ejercicio creado;
     *
     * @return TestExcercise - ejercicio creado;
     * @throws ExerciseNotBuiltException;
     * @throws PunctuationZeroException;
     */
    public abstract TestExcercise getExercise() throws ExerciseNotBuiltException, PunctuationZeroException;

    /**
     * Permite setear un ejercicio, para visualizarlo y/o modificarlo;
     *
     * @param testExerciseData;
     */
    public abstract void setExercise(TestExcercise testExerciseData);

    /**
     * Permite obtener el TestPanelEnum que se ha de usar para visualizar el ejercicio;
     *
     * @return TestPanelEnum;
     */
    public TestPanelEnum getPanelEnum() {
        return testPanelEnum;
    }

    /**
     * Resetea el ejercicio;
     */
    public abstract void reset();
}
